package demon2;

public class Test {
    public static void main(String[] args) {
        ProductGetter<String> productGetter=new ProductGetter<>();
        String[] strProduct={"手机","食品","机器人","咖啡机"};
        for (int i = 0; i < strProduct.length; i++) {
            productGetter.add(strProduct[i]);
        }
        String product=productGetter.getProduct();
        System.out.println("恭喜你抽中了: "+product);
        ProductGetter<Integer> productGetter1=new ProductGetter<>();
        int[] money={1,2,3,4,5,6,7};
        for (int i = 0; i < money.length; i++) {
            productGetter1.add(money[i]);
        }
        Integer getMoney= productGetter1.getProduct();
        System.out.println(getMoney);
    }
}
